package com.sc.entity;

import com.baomidou.mybatisplus.annotations.TableName;
import com.sc.entity.single.Config;

import java.util.Date;

/**
 * @Author: Sunk 673116067@qq.com
 * @Date: 2018/5/17 16:50
 * @Description:
 */
@TableName("yt_images")
public class Image {
    private Long imageId;
    private Long productId;
    private String imgSrc;
    private Date createTime;
    private Date updateTime;

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getImgSrcVO() {
        return Config.getInstance().getImgUrl()+"/"+imgSrc;
    }

    public String getImgSrc() {
        return imgSrc;
    }

    public void setImgSrc(String imgSrc) {
        this.imgSrc =imgSrc;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Image{" +
                "imageId=" + imageId +
                ", productId=" + productId +
                ", imgSrc='" + imgSrc + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
